home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
modeler
/
symmetrize.lwm
< prev
next >
Wrap
Text File
|
1993-12-13
|
894b
|
46 lines
/* CMD: Symmetrize
* Make layer n-fold symmetric */
/* By Arnie Cachelin Copyright © 1992 NewTek, Inc. */
libadd = addlib("LWModelerARexx.port",0)
signal on error
signal on syntax
axis.1='X'
axis.2='Y'
axis.3='Z'
call req_begin "n-Fold Rotational Symmetry"
AxId = req_addcontrol("Axis", "CH",'X Y Z')
SymId = req_addcontrol("Degree of Symmetry, n:",'N')
call req_setval SymId, 6,6
call req_setval AxId, 3
x = req_post()
if (x) then do
n= req_getval(SymId)
Ax= req_getval(AxId)
call req_end()
end
else do
call req_end()
exit
end
astep=360/n
a=0
call COPY() /* Get 0° version */
say n astep
do i=1 to n-1
call ROTATE(astep,axis.Ax,0)
call PASTE() /* Put down 0° version */
a=a+astep
say a
end
exit
syntax:
error:
call end_all
t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
if (libadd) then call remlib("LWModelerARexx.port")
exit